#ifndef FRAMEBUFFER_H_INCLUDED
#define FRAMEBUFFER_H_INCLUDED

#include <string>

#include "object.h"
#include "color.h"
#include "photon.h"

class FrameBuffer : public Object {
public:
    FrameBuffer( void ) : image( NULL ), x( 0 ), y( 0 ) { }
    FrameBuffer( unsigned int xx, unsigned int yy ) : Object(), x( xx ), y ( yy ) { image = new Color[ x * y ]; }
    ~FrameBuffer( void ) { delete image; };
    void interact( Photon & ) { }
    void writeBitmap( std::string ) const;
    void setSize( unsigned int, unsigned int );
    void clear( const Color & );
    void clear( float, float, float );
private:
    Color * image;
    unsigned int x, y;
};

#endif // FRAMEBUFFER_H_INCLUDED
